import axios from 'axios';

//角色列表
let list = (params) => axios.get('/api/role/list', { params });
//添加角色
let insert = (data) => axios.post('/api/role', data);
//删除角色
let remove = (params) => axios.delete('/api/role', { params });
//修改角色
let update = (data) => axios.put('/api/role',data);
//角色右侧配置
let config = (params) => axios.get('/api/role/config', { params });
//获取所有菜单权限分类
let subcate = (params) => axios.get('/api/menu/sub', { params });
//更新菜单权限
let edit = (data) => axios.put('/api/menu',data);
//删除菜单权限
let cancel = (params) => axios.delete('/api/menu', { params });
//添加菜单权限
let add = (data) => axios.post('/api/menu', data);
//获取所有图标列表
let iconall = (params) => axios.get('/api/admin/icon/list', { params });
//修改节点图标
let iconset = (data) => axios.put('/api/menu/icon',data);
export default{
	list,
	insert,
	remove,
	subcate,
	update,
	edit,
	cancel,
	add,
	config,
	iconall,
	iconset
}